package com.jml.session;


import com.jml.builder.XMLConfigBuilder;

public class SqlSessionFactoryBuilder {

    /**
     * 解析我们的my_config.properies
     */
    public SqlSessionFactory build(String properiesName) {
        XMLConfigBuilder xmlConfigBuilder = new XMLConfigBuilder(properiesName);
        Configuration parse = xmlConfigBuilder.parse();
        SqlSessionFactory sqlSessionFactory = build(parse);
        return sqlSessionFactory;
    }

    public SqlSessionFactory build(Configuration config) {
        return new DefaultSqlSessionFactory(config);
    }

}
